package com.yeban.javase.day02.test05;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/10/10
 * <p>
 * 3、定义装备类Equip，可以通过这个类创建各种装备
 * 属性：
 * 装备拥有名称name，级别level，颜色color，类别kind，攻击力power，防御力defence。
 * 方法：
 * 装备拥有获取装备信息的方法show()。
 */
public class Equip {

    private String name;    // 装备名称
    private int level;      // 级别
    private String color;   // 颜色
    private String kind;    // 类别
    private int power;      // 攻击力
    private int defence;    // 防御力

    public Equip() {
    }

    public Equip(String name, int level, String color, String kind, int power, int defence) {
        this.name = name;
        this.level = level;
        this.color = color;
        this.kind = kind;
        this.power = power;
        this.defence = defence;
    }

    public void show() {    // 获取装备信息的方法
        System.out.println(this);
    }

    /**
     * 获取
     *
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     *
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     *
     * @return level
     */
    public int getLevel() {
        return level;
    }

    /**
     * 设置
     *
     * @param level
     */
    public void setLevel(int level) {
        this.level = level;
    }

    /**
     * 获取
     *
     * @return color
     */
    public String getColor() {
        return color;
    }

    /**
     * 设置
     *
     * @param color
     */
    public void setColor(String color) {
        this.color = color;
    }

    /**
     * 获取
     *
     * @return kind
     */
    public String getKind() {
        return kind;
    }

    /**
     * 设置
     *
     * @param kind
     */
    public void setKind(String kind) {
        this.kind = kind;
    }

    /**
     * 获取
     *
     * @return power
     */
    public int getPower() {
        return power;
    }

    /**
     * 设置
     *
     * @param power
     */
    public void setPower(int power) {
        this.power = power;
    }

    /**
     * 获取
     *
     * @return defence
     */
    public int getDefence() {
        return defence;
    }

    /**
     * 设置
     *
     * @param defence
     */
    public void setDefence(int defence) {
        this.defence = defence;
    }

    public String toString() {
        return "Equip{name = " + name + ", level = " + level + ", color = " + color + ", kind = " + kind + ", power = " + power + ", defence = " + defence + "}";
    }
}
